1.I have two string 1.abc and 2.abc_1 and i am comparing these two string 2nd string has two extra character, after comparing how to return these character in php. 2.If the string not ends with "_1" i want to add "_1" if the string ends with "_1 or (any numeric value)" i want to add +1 to that value,how to do this in php.
$jobref='abc';
$newjobref='abc_1';
if(strcasecmp($jobref,$newjobref)==0)
{
//here i want to add _1 to that string
}
else
{
//return last two character
if(last character == (any numeric value))
{
//add plus 1 to that value
}
}