trying to figure out the correct logic

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
cayres
Forum Newbie
Posts: 2
Joined: Mon Jul 12, 2004 2:59 pm

trying to figure out the correct logic

Post by cayres »

field contains data strings

1 2 3
1 3
1 2

I want to look at the string and replace the number with an image

Would you use >> if .. else statements, concatenated
or should I be using something else?

I guess its been a long week already!
User avatar
feyd
Neighborhood Spidermoddy
Posts: 31559
Joined: Mon Mar 29, 2004 3:24 pm
Location: Bothell, Washington, USA

Post by feyd »

Code Snippets is the wrong forum. :roll:

Moving to PHP - Code
User avatar
PrObLeM
Forum Contributor
Posts: 418
Joined: Sun Mar 07, 2004 2:30 pm
Location: Mesa, AZ
Contact:

Post by PrObLeM »

Code: Select all

$array = explode(' ' , $data);
foreach($array as $number)
{
	//replace the numbers with images here
}
cayres
Forum Newbie
Posts: 2
Joined: Mon Jul 12, 2004 2:59 pm

Post by cayres »

wow - I was on the wrong track!

Thank you
Post Reply