gudfry Posted July 23, 2008 Share Posted July 23, 2008 hi all; I'm not getting any errors when I try and test this code, so can you look it over and tell me if its correct. my main goal is im returning this value /* $Author : Chad */ as Author Chad. I have this code to cheak. if(strpos($file,'/* $')===0) { // chexk for the ':' if(strpos($file,':')>=5) { // check for the ending '*/' if (strpos($file,'*/')>=6) { // we have a matching string, so get the values and returnin array $retval=array(); $positionOfColon=strpos($file,":"); //echo $positionOfColon; $lengthOfString0Ineed=$positionOfColon-4; // or something like that, might miss 1 $retval[0]=substr($file,4,$lengthOfString0Ineed); $retval[1]=substr($file,$positionOfColon+1,strlen($file)-$positionOfColon-3); return $retval; Link to comment https://forums.phpfreaks.com/topic/116138-solved-please-cheack-the-line-of-my-code/ Share on other sites More sharing options...
kpetsche20 Posted July 23, 2008 Share Posted July 23, 2008 why do you have 3 = after the strpos Link to comment https://forums.phpfreaks.com/topic/116138-solved-please-cheack-the-line-of-my-code/#findComment-597224 Share on other sites More sharing options...
gudfry Posted July 23, 2008 Author Share Posted July 23, 2008 hi; thanks I got the problem now. tahnks with question too Link to comment https://forums.phpfreaks.com/topic/116138-solved-please-cheack-the-line-of-my-code/#findComment-597227 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.