Go Premium for a chance to win a PS4. Enter to Win

x
  • Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 9141
  • Last Modified:

remove the first character to the left of a string

hi,
How do i remove the left most character from a string?
0
markmchugh
Asked:
markmchugh
  • 2
1 Solution
 
hernst42Commented:
echo substr($string, 1);
0
 
kszurekCommented:

<?PHP
$a = 'test';
echo substr($a, 1);

Open in new window

0
 
hernst42Commented:
http://www.php.net/substr
echo substr('abcdef', 1);     // bcdef
0
 
zacheraCommented:
[code]<?php
echo substr($string,1);
?>[/code]
0

Featured Post

Ask an Anonymous Question!

Don't feel intimidated by what you don't know. Ask your question anonymously. It's easy! Learn more and upgrade.

  • 2
Tackle projects and never again get stuck behind a technical roadblock.
Join Now