PHP programming forum. Ask questions or help people concerning PHP code. Don't understand a function? Need help implementing a class? Don't understand a class? Here is where to ask. Remember to do your homework!
Hi, it works now. I do not understand why it did not work the first time b/c that is the exact and only snippet I was using. One of those php 'ghostys' maybe , heh.
Make shure you send headers to prevent proxy or browser caching. Otherwise, you might get confused by pages not appearing as they should (and have database corruption... if you code without database integrity between page-loads and proper use of session vars in mind).
For replacing, i strongly suggest using eregi_replace().
Here is a snipplet from a guest book i made, i enabled Smilies in the guest book by using a simple eregi_replace() function to replace the smilies call with the image to display:
If you're just doing a straight replace ie, replace this exact text with this other exact text then use str_replace(). If you're replacing needs are more complex, ie. you need to use regular expressions then you'd need to use ereg_replace() or preg_replace().