Kibit Posted May 1, 2008 Share Posted May 1, 2008 Wonder if any of you kind people could help me please... I currently have this code... <?php $now = date("D_H:00"); //snip $shows['Thu_04:00']['title']="4am till 5am Show"; $shows['Thu_05:00']['title']="<img src="/images/now%20playing%20scroller%20images/auto_gman_next.gif" width="150" height="30" />"; //snip echo $shows[date("D_H:00")]['title']; ?> Which works fine for the 4am line as its plain text, but gives me a parse error for the 5am line as I've tried to insert some simple html to show an image. Is there a bit of php code I can use instead of the html line so i don't get this parse error? Quote Link to comment Share on other sites More sharing options...
miracle_potential Posted May 1, 2008 Share Posted May 1, 2008 Replace your %20 with _ because PHP is trying to read it as a mathmatical eqation and/or take out all those " lol <?php $now = date("D_H:00"); //snip $shows['Thu_04:00']['title']="4am till 5am Show"; $shows['Thu_05:00']['title']="<img src='/images/now%20playing%20scroller%20images/auto_gman_next.gif' width='150' height='30' />"; //snip echo $shows[date("D_H:00")]['title']; ?> OR <?php $now = date("D_H:00"); //snip $shows['Thu_04:00']['title']="4am till 5am Show"; $shows['Thu_05:00']['title']="<img src='/images/now_playing_scroller_images/auto_gman_next.gif' width='150' height='30' />"; //snip echo $shows[date("D_H:00")]['title']; ?> both should work 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.