How to get last inserted id in PHP MySql

If we insert a row into a mysql table that contains an AUTO_INCREMENT column, we can retrieve the value stored into that column by using the PHP function mysql_insert_id(). so we no need to create separate query to read the newly inserted value. What is differences between LAST_INSERT_ID() and mysql_insert_id()? The reason for the differences […]

PHP Split a string by string using explode method

php explode — Split a string by string Returns an array of strings, each of which is a substring of string formed by splitting it on boundaries formed by the string delimiter. Example 1 <?php $example  = “example1 example2 example3 example4 example5 example6″; $result = explode(” “, $example); echo $result[0]; // example1 echo $result[1]; // […]

Proudly powered by WordPress   Premium Style Theme by