Jump to content

quick question


php_novice2007

Recommended Posts

ok:

 

i think this might work......I dont know about php, but it would in python.  I dont know about the string indexing etc in php or even if it supports it, however :

 

 

$char = string[0];

if ($char == ".") {

      $new_string = string[1:-1];

}

 

print $new_string

 

 

ive put python code in blue....

 

 

hope this helps

 

Link to comment
https://forums.phpfreaks.com/topic/55689-quick-question/#findComment-275169
Share on other sites

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.