Jump to content

add string to variables


newphpcoder

Recommended Posts

HiGood day!I just want to know if what syntax/code should I use to put - in my data variable.for example I have this data.$lot_number_indi_scan = 'LO130315002LO130318001';I want to create a new variable and the output has added - between the lot_number_indi_scan like this:$newlot = 'LO130315002-LO130318001';I want to happen is first I will check the length of $lot_number_indi_scan if length is greater than 10 every lot_number_indi_scan has -like this: $newlot = 'LO130315002-LO130318001';Any help is highly appreciated.Thank you so much.

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...