Jump to content

add string to variables

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 post
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

  • Create New...