Jump to content

How to detect leading zeros


realjumper

Recommended Posts

Hi,

 

The student id that is entered into a form is always a string of numbers....and no student numbers ever start with zero ('0'). Yet, some student has entered a zero before his student number...sigh! So, how can I detect whether the first interger in the string is a '0', and if it is, strip it out? I'm searching for the answer as we speak, but you may have an idea.

 

Many thanks,

Neil

Link to comment
https://forums.phpfreaks.com/topic/39739-how-to-detect-leading-zeros/
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.