Page 1 of 1

php echo please help

Posted: Mon Apr 19, 2010 10:00 am
by bonanza
Hi,
I have a database field long text. I retrieved it from the database and explode it with the function explode(). what I want to do next is to echo the parts of the database field one after another controlled by time in which the new echo will replace the old one not to get under it.

please if any one know how to do this or if it couldnt be done tell me

Re: php echo please help

Posted: Mon Apr 19, 2010 10:51 am
by greyhoundcode
So if the exploded string leaves you with Apples, Bananas, Pears then what you want is for Apples to appear first, then you want that to disappear from the screen and be replaced by Bananas, etc. And you want this to happen at predetermined time intervals?

Assuming I have understood you correctly, then I imagine the best approach would be to use Javascript. You could generate or populate the JS array (containing your exploded string) using your PHP script.

Re: php echo please help

Posted: Mon Apr 19, 2010 4:50 pm
by bonanza
thats exactly what I want. And I`m dont know much about javascript can I get some further help about that please.
thanks

Re: php echo please help

Posted: Mon Apr 19, 2010 7:13 pm
by califdon
Make sure you understand the difference between a server-side language (PHP) and a client-side language (Javascript), that's critically important.

Then please notice that this post is in a PHP - Code forum, so if you have Javascript questions, please post them in our Javascript forum.

There's an abundance of information and tutorials on both these languages. I recommend starting with http://w3schools.com.