bgsomers Posted May 7, 2007 Share Posted May 7, 2007 I have a routine that scans guest-book entries for objectionable words or terms, using the function strpos: if strpos($entry, 'word1') == TRUE or strpos($entry, 'word2') == TRUE ... I want to create "strposplus", which will use strpos in this way, but when a word is found, will write that word to a file, along with the entry itself. if strposplus($entry, 'word1') == TRUE or strposplus($entry, 'word2') == TRUE ... Does the argument 'word1' get a name by which it can be referenced? Or must I assign it to a named variable before my call to strposplus? Bruce Link to comment https://forums.phpfreaks.com/topic/50349-referencing-literals/ Share on other sites More sharing options...
trq Posted May 7, 2007 Share Posted May 7, 2007 You would need to assign it yourself. Link to comment https://forums.phpfreaks.com/topic/50349-referencing-literals/#findComment-247207 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.