Re: looping through text with array_key_exists function



drako wrote:
Not exactly sure what could be going on here, and how to move
forwards.


$text = 'a b c';

print preg_replace('/([a-z0-9])/', '<img src="$1.jpg" />', $text);

Or if you also have images for uppercase letters:

print preg_replace('/([a-z0-9])/i', '<img src="$1.jpg" />', $text);


JW


.