php echo please help

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!

Moderator: General Moderators

Post Reply
bonanza
Forum Newbie
Posts: 7
Joined: Mon Apr 19, 2010 9:50 am

php echo please help

Post 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
User avatar
greyhoundcode
Forum Regular
Posts: 613
Joined: Mon Feb 11, 2008 4:22 am

Re: php echo please help

Post 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.
bonanza
Forum Newbie
Posts: 7
Joined: Mon Apr 19, 2010 9:50 am

Re: php echo please help

Post 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
User avatar
califdon
Jack of Zircons
Posts: 4484
Joined: Thu Nov 09, 2006 8:30 pm
Location: California, USA

Re: php echo please help

Post 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.
Post Reply