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']); 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.