adam291086 Posted December 18, 2007 Share Posted December 18, 2007 Which function do i need to use to ensure my data has a / Link to comment https://forums.phpfreaks.com/topic/82182-solved-search-a-string/ Share on other sites More sharing options...
rajivgonsalves Posted December 18, 2007 Share Posted December 18, 2007 you can use strstr or strpos you can also use regular expressions Link to comment https://forums.phpfreaks.com/topic/82182-solved-search-a-string/#findComment-417577 Share on other sites More sharing options...
adam291086 Posted December 18, 2007 Author Share Posted December 18, 2007 I am using stripos and i get the following error Fatal error: Call to undefined function: stripos() in /homepages/12/d214897219/htdocs/adam/cycling/calendar/addevent.php on line 37 this is line 37 $date1 = stripos($date, $findme); $findme = "/"; Link to comment https://forums.phpfreaks.com/topic/82182-solved-search-a-string/#findComment-417582 Share on other sites More sharing options...
trq Posted December 18, 2007 Share Posted December 18, 2007 Are you using php5? stripos is a php5 only function. Simply use strpos. Link to comment https://forums.phpfreaks.com/topic/82182-solved-search-a-string/#findComment-417583 Share on other sites More sharing options...
adam291086 Posted December 18, 2007 Author Share Posted December 18, 2007 I have just realised that. changed tp strpos. Thanks Link to comment https://forums.phpfreaks.com/topic/82182-solved-search-a-string/#findComment-417584 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.