PHP programming forum. Ask questions or help people concerning PHP code. Don't understand a function? Need help implementing a class? Don't understand a class? Here is where to ask. Remember to do your homework!
$friend= substr("$row->title", -8);
if ($friend== "DOG")
{ echo "
Hello. This code is meant to go back 8 characters and find the word DOG. It is the 8th character, but I was wondering if there is a way to search the entire variable, randomly (ie. 4th, 5th.... ANY set of characters) for a particular word.
I can't find any method to do this.
Love PHP. Love CSS. Love learning new tricks too.
All the best from the United Kingdom.
mysql_function(): WARNING: This extension is deprecated as of PHP 5.5.0, and will be removed in the future. Instead, the MySQLi or PDO_MySQLextension should be used. See also MySQL: choosing an API guide and related FAQ for more information.
if (preg_match("/php|http|@|\.co\.uk/i", "PHP is the web scripting language of choice.")) {
mysql_function(): WARNING: This extension is deprecated as of PHP 5.5.0, and will be removed in the future. Instead, the MySQLi or PDO_MySQLextension should be used. See also MySQL: choosing an API guide and related FAQ for more information.