Greg Z - 2009-10-12 22:32:09
Hello. I'm trying to call up a mysql dbase item number for a substr to look at and evaluate (to alter product page titles for similar items in a large database). In the simple example below ... which is as far as I got, I meant to look at the item number and if it ends in 6, say it ends in 6. Of course, not working. If I just sub a numder for the php echo, it works, but not when I try the php echo. Is there an easy way to accomplish this, is my syntax just off, or ? Any help would be greatly appreciated.
Thanks.
<?php
if (substr(<?php echo $row_Recordset1['Item_Num']; ?>, -1) == '6') echo "Number ends with 6!";
else echo "Number doesn't end with 6!";
?>