rkm140 Posted September 24, 2009 Share Posted September 24, 2009 Thanks for the code yesterday it made things a lot simpler, however i am stilling having issue with it. 1. if a text post that doesn't include [ ] has ad in it it will post the image. I am trying to get to only post the image for the letter combination and number combination within [ ]. 2. below is a screen shot of what is going on. it will post image sometimes and sometimes it wont $cards = array('2','3','4','5','6','7','8','9','T','J','Q','K','A'); $suits = array ('c','d','h','s'); $fromArray = $toArray = array(); foreach($cards as $card) { foreach($suits as $suit) { $word[] = '['.$card.$suit; $word[] = $card.$suit.']'; $word[] = ' '.$card.$suit.' '; $link[] = '[<img src="http://mypokerrails.com/forum1/cards/'.$card.$suit.'.png">'; $link[] = '<img src="http://mypokerrails.com/forum1/cards/'.$card.$suit.'.png">]'; $link[] = '<img src="http://mypokerrails.com/forum1/cards/'.$card.$suit.'.png">'; } } $this->post['message'] = str_ireplace($word, $link, $this->post['message']); Link to comment https://forums.phpfreaks.com/topic/175357-still-trying-to-get-this-to-work/ Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.