hi

just run into a small problem i can not fiqure out

i am trying to remove 34 characters from the beginiing of a string in a for loop and also at the same time remove 5 characters from the end

how can i remove the 5 characters at the same time as removing the 34 beginning characrters????

heres a snippet of code

Echo data to validate the download and parse

for($xx=0; $xx<count($body); $xx++)
echo substr_replace($body[$xx] ,"",0,34);

the substr_replace removes the first 34 characters ok, but how can i also remove 5 characters from the end of this string at the same time in the for loop??

any help or pinters on this whould be very usefull, thanks

    echo substr($body[$xx], 34, -5);
    

      thanks for the lighting fast reply

      this works perfectly, i was trying all sorts of combos to do this, but your solution, is so simple i can not belive i never figured this out, back to more reading of my php books

      thanks tho for pointing me in the right direction, your a god send on this one

        Write a Reply...