TheFilmGod Posted September 16, 2007 Share Posted September 16, 2007 <?php if (preg_match("1", "$code")) { $one = "Aluminum Foil,"; } ?> What's wrong with this? I get this: Warning: preg_match() [function.preg-match]: Delimiter must not be alphanumeric or backslash in /home/content/i/n/t/internetknight/html/2010/wall_view.php on line 153 Link to comment https://forums.phpfreaks.com/topic/69518-solved-preg_matchhelp-me/ Share on other sites More sharing options...
rarebit Posted September 16, 2007 Share Posted September 16, 2007 '/' is used to define a boundry, see: http://uk3.php.net/manual/en/function.preg-match.php therefore: <?php if (preg_match("/1/", "$code")) { $one = "Aluminum Foil,"; } ?> Should work... Link to comment https://forums.phpfreaks.com/topic/69518-solved-preg_matchhelp-me/#findComment-349309 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.