PDA

View Full Version : simple php Q. from a newbie


Paul Ferrie
04-30-2003, 01:10 AM
Can someone tell me to shoreten stirng information. I mean:

Load information from db

$msg="blah blah blah blah blah blah blah blah blah blah blah " ;
What i am trying to do is before the information is sent to output
I want to shorten it so that it is like
$msg="blah blah blah..." ;

cheers

freddycodes
04-30-2003, 01:20 AM
Do you want to do this in the flash movie, or in a script after retrieving it from the db, what language, PHP?

Paul Ferrie
04-30-2003, 01:24 AM
Both would be good
cheers

freddycodes
04-30-2003, 01:38 AM
IN PHP


$msg="blah blah blah blah blah blah blah blah blah blah blah ";
$msg = substr($msg, 0, strpos($msg, ' ', 3))."....";

Paul Ferrie
04-30-2003, 10:22 AM
explain please:confused: