AaaDee wrote:hello moody moderator
looked it up, found a way but doesnt work.
i enter
substr($news,0,90); where the code will be displayed and all it displays is
substr(the actual news statement from my database.,0 , 90);
any help, or SORRY for troubling you.
It sounds to me like you're not using the function correctly. Have you surround them in quote tags? If you have PHP won't see the function as a function, it'll just see it as normal text.
For example:
- Code: Select all
<?
print "This story: substr($news,0,90);";
?>
This is wrong because PHP is interpreting the
substr as a string, and not a function. The correct procedure is:
- Code: Select all
<?
print "This story: ".substr($news,0,90);
?>
Now the function is being processed by PHP instead of being interpretted as a string in itself. This should hopefully fix your problem.
