Solved

remove the first character to the left of a string

Posted on 2008-06-20
4
9,134 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

Gigs: Get Your Project Delivered by an Expert

Select from freelancers specializing in everything from database administration to programming, who have proven themselves as experts in their field. Hire the best, collaborate easily, pay securely and get projects done right.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

I imagine that there are some, like me, who require a way of getting currency exchange rates for implementation in web project from time to time, so I thought I would share a solution that I have developed for this purpose. It turns out that Yaho…
Password hashing is better than message digests or encryption, and you should be using it instead of message digests or encryption.  Find out why and how in this article, which supplements the original article on PHP Client Registration, Login, Logo…
Explain concepts important to validation of email addresses with regular expressions. Applies to most languages/tools that uses regular expressions. Consider email address RFCs: Look at HTML5 form input element (with type=email) regex pattern: T…
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 …

813 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

12 Experts available now in Live!

Get 1:1 Help Now