Jump to content

[SOLVED] please cheack the line of my code


gudfry

Recommended Posts

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;

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.