Solved

remove the first character to the left of a string

Posted on 2008-06-20
4
9,131 Views
Last Modified: 2010-05-18
hi,
How do i remove the left most character from a string?
0
Comment
Question by:markmchugh
  • 2
4 Comments
 
LVL 48

Accepted Solution

by:
hernst42 earned 500 total points
ID: 21830548
echo substr($string, 1);
0
 
LVL 2

Expert Comment

by:kszurek
ID: 21830550

<?PHP

$a = 'test';

echo substr($a, 1);

Open in new window

0
 
LVL 48

Expert Comment

by:hernst42
ID: 21830559
http://www.php.net/substr
echo substr('abcdef', 1);     // bcdef
0
 

Expert Comment

by:zachera
ID: 22474889
[code]<?php
echo substr($string,1);
?>[/code]
0

Featured Post

Do You Know the 4 Main Threat Actor Types?

Do you know the main threat actor types? Most attackers fall into one of four categories, each with their own favored tactics, techniques, and procedures.

Join & Write a Comment

Developers of all skill levels should learn to use current best practices when developing websites. However many developers, new and old, fall into the trap of using deprecated features because this is what so many tutorials and books tell them to u…
This article discusses how to create an extensible mechanism for linked drop downs.
The viewer will learn how to dynamically set the form action using jQuery.
The viewer will learn how to create a basic form using some HTML5 and PHP for later processing. Set up your basic HTML file. Open your form tag and set the method and action attributes.: (CODE) Set up your first few inputs one for the name and …

760 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

22 Experts available now in Live!

Get 1:1 Help Now