Jump to content

numbers


brown2005

Recommended Posts

[code]<?php
$a='544';
$numbers=array('1','2','3','4','5','6','7','8','9','0');
$images=array('<img src="image1.png">','<img src="image2.png">','<img src="image3.png">','<img src="image4.png">','<img src="image5.png">','<img src="image6.png">','<img src="image7.png">','<img src="image8.png">','<img src="image9.png">','<img src="image0.png">');
$b=str_replace($numbers,$images,$a);
echo $b;
?>[/code]
Tested and working :)

Take it your using it for counter or date and time or somthing? I use to use the same for a counter back in the day :)

Liam
Link to comment
https://forums.phpfreaks.com/topic/17509-numbers/#findComment-74474
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.