microsocket Posted August 20, 2013 Share Posted August 20, 2013 Hi , Anyone know where to start looking to `style` numbers in the same way as torn cities online now etc numbers on the homepage ? Thanks for any tips posted Quote Link to comment Share on other sites More sharing options...
Dayo Posted August 20, 2013 Share Posted August 20, 2013 i done something similar at http://forbiddenage.com/ i done mine via JS but using php you can use str_replace like so $string = date('d/m/Y H:i:s', $timestamp); $find = array('/', ':', '1', '2', '3', ........); $replace = array('<img src="img/dash.png" alt="" />', '<img src="img/colon.png" alt="" />', '<img src="img/1.png" alt="" />', '<img src="img/2.png" alt="" />', '<img src="img/3.png" alt="" />', ........); $new_string = str_replace($find, $replace, $string); Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.