What happened to the Messenger Plus! forums on msghelp.net?
Shoutbox » MsgHelp Archive » Skype & Technology » Tech Talk » php coding help

2 votes - 5 average   php coding help
Author: Message:
Jammie
New Member
*


Posts: 4
– / Male / –
Joined: Sep 2004
RE: php coding help
code:
<?
$search = array('0star','1star','2star','3star','4star','5star');
$replace = array('Rating Coming Soon','<img src="images/download/star.gif">','<img src="images/download/star.gif"><img src="images/download/star.gif">','<img src="images/download/star.gif"><img src="images/download/star.gif"><img src="images/download/star.gif">','<img src="images/download/star.gif"><img src="images/download/star.gif"><img src="images/download/star.gif"><img src="images/download/star.gif">','<img src="images/download/star.gif"><img src="images/download/star.gif"><img src="images/download/star.gif"><img src="images/download/star.gif"><img src="images/download/star.gif">');
echo str_replace($search, $replace, $post);
?>


This code would output as blank as there is no value being past to the function within the $post variable. To make the code work you would need to use something along the lines of the following:

code:
<?
$post = "0star 1star";
$search = array('0star','1star','2star','3star','4star','5star');
$replace = array('Rating Coming Soon','<img src="images/download/star.gif">','<img src="images/download/star.gif"><img src="images/download/star.gif">','<img src="images/download/star.gif"><img src="images/download/star.gif"><img src="images/download/star.gif">','<img src="images/download/star.gif"><img src="images/download/star.gif"><img src="images/download/star.gif"><img src="images/download/star.gif">','<img src="images/download/star.gif"><img src="images/download/star.gif"><img src="images/download/star.gif"><img src="images/download/star.gif"><img src="images/download/star.gif">');
echo str_replace($search, $replace, $post);
?>


Hope this helps :D

Jamie
09-05-2004 08:15 AM
Profile E-Mail PM Web Find Quote Report
« Next Oldest Return to Top Next Newest »

Messages In This Thread
php coding help - by Eljay on 09-04-2004 at 05:26 PM
RE: how to include smilies - by fluffy_lobster on 09-04-2004 at 05:59 PM
RE: php coding help - by Eljay on 09-04-2004 at 06:21 PM
RE: php coding help - by -dt- on 09-05-2004 at 05:45 AM
RE: php coding help - by k776 on 09-05-2004 at 06:09 AM
RE: php coding help - by Jammie on 09-05-2004 at 08:15 AM
RE: php coding help - by fluffy_lobster on 09-05-2004 at 04:35 PM
RE: php coding help - by k776 on 09-06-2004 at 09:18 AM
RE: php coding help - by WDZ on 09-06-2004 at 09:33 AM
RE: php coding help - by k776 on 09-08-2004 at 05:30 AM
RE: php coding help - by WDZ on 09-08-2004 at 12:51 PM
RE: php coding help - by k776 on 09-09-2004 at 12:10 AM
RE: php coding help - by WDZ on 09-09-2004 at 02:56 AM
RE: php coding help - by k776 on 09-09-2004 at 03:48 AM
RE: php coding help - by WDZ on 09-09-2004 at 04:23 AM
RE: php coding help - by k776 on 09-09-2004 at 04:51 AM
RE: php coding help - by WDZ on 09-09-2004 at 05:20 AM
RE: php coding help - by k776 on 09-09-2004 at 05:42 AM
RE: php coding help - by WDZ on 09-09-2004 at 12:38 PM
RE: php coding help - by k776 on 09-09-2004 at 08:46 PM
RE: php coding help - by fluffy_lobster on 09-10-2004 at 06:19 PM
RE: php coding help - by k776 on 09-10-2004 at 09:37 PM
RE: php coding help - by WDZ on 09-11-2004 at 03:08 AM
RE: php coding help - by Eljay on 09-11-2004 at 06:38 AM
RE: php coding help - by k776 on 09-13-2004 at 09:37 AM
RE: php coding help - by Eljay on 09-13-2004 at 04:32 PM


Threaded Mode | Linear Mode
View a Printable Version
Send this Thread to a Friend
Subscribe | Add to Favorites
Rate This Thread:

Forum Jump:

Forum Rules:
You cannot post new threads
You cannot post replies
You cannot post attachments
You can edit your posts
HTML is Off
myCode is On
Smilies are On
[img] Code is On