PHP Tutorial : Get line number
May 31, 2009 Useful PHP
As you might know, PHP Server comes with built-in / already defined constants. Today I’ve been discovering a nice one which gets the line number in a file for you. This may be very usefull in a lot of cases, like a custom error system, debugging and not only. That CONSTANT is called simply _LINE_
<?php
print…………….
Read PHP Tutorial : Get line number »
Tags: built-in constant, php constants, php get line number, php line number, _LINE_, _LINE_ already defined constant
Link to us (please)
May 28, 2009 Link to us
Your benefit? No need to read hundreds of pages and comments to learn a simple function. Everything is presented with an example as well as a short article.
Read Link to us (please) »
Tags: Link to us
PHP Tutorial : String lenght with strlen
May 26, 2009 Basic PHP
I’ll be directly on this short one. Shame on me that I didn’t writed about this untill now : there’s an interesting php function which you might need frequently called strlen() which translates into string lenght. I’m sure you met it already into previous tutorials on this php tutorials blog but I think I didn’t…………….
Read PHP Tutorial : String lenght with strlen »
Tags: php count characters, php count digits, php string lenght, php strlen, string lenght, strlen
PHP Tutorial : If condition in the short way (shorthand if)
May 21, 2009 Basic PHP
Do you know basical php if() condition right? Yeah, right. Everybody does. To tell the truth, without a comparison operator a language would not be qualified as “programming language” (that’s why HTML is a markup language and not a programming language: it can not do comparisons and alter the program flow according to their results).
But…………….
Read PHP Tutorial : If condition in the short way (shorthand if) »
Tags: if, if condition, if function, php if, php ternary comparison, php ternary operator, short if, shorthand if
PHP Tutorial : Extract function
May 14, 2009 Useful PHP
A shame for me but I must tell you this function called extract() simply rocks : it will extract “keys” from an array and convert them into variables, so no more needed to manually declare variables for validation purposes from forms.
<form action="" method="post">
name <input type="text" name="name"><br/>
email <input type="text" name="email"><br/>
<input type="submit" name="sb" id="sb" value="go">
</form>
<?php
if(isset($_POST['sb'])) {
extract($_POST);
if(empty($name) ||…………….
PHP Tutorial : Mysql Dump
May 8, 2009 Php & MySQL
Did you see this expression and doubt what it means? Mysql Dumps are files in different extensions/formats like .sql, .txt etc. which are used to store databases informations, table structures, mysql tables creations, table datas/entries and more. The mysql dumps are usually used to make a backup, transfer a website database when switching hosts for…………….
Read PHP Tutorial : Mysql Dump »
Tags: mysql dump, mysql dumps, mysqldump
PHP Tutorial : Extracting rows from mysql
May 8, 2009 Php & MySQL
Helllooooooo,
In latest two posts I have shown you how to connect to a mysql database via PHP, and in another one I teach you how to select rows from a mysql database table. In this one I will show you how to extract that rows from mysql and print them out into a page. Let’s…………….
Read PHP Tutorial : Extracting rows from mysql »
Tags: extracting rows, Extracting rows from mysql, mysql, mysql extract, mysql fields, mysql loop, mysql print, mysql print rows fields, mysql rows, rows
PHP Tutorial : Building a MySQL query
May 3, 2009 Php & MySQL
In a recent tutorial I was showing you how to build a connection to MySQL database via PHP. In this one I will show you how to create a query to interogate a table of the database. Look below :
<?php
$query = mysql_query(“select * from table_Name”);
?>
* – sign means all, so by using this query, you…………….
Read PHP Tutorial : Building a MySQL query »
Tags: mysql, mysql interogate, mysql select, mysql select table fields, mysql table, mysql_query, query

