rgb192
asked on
run column2 through a function and output would be in column3
using mysqli, or pdo
I would like a php function that prepends 'begin' and postpends 'end' to an existing varchar field
table.column1 int primary key autoincrement
table.column2 varchar
table.column3 varchar
example output
5454 begin5454end
656 begin656end
4 begin4end
A beginAend
I would like a php function that prepends 'begin' and postpends 'end' to an existing varchar field
table.column1 int primary key autoincrement
table.column2 varchar
table.column3 varchar
example output
5454 begin5454end
656 begin656end
4 begin4end
A beginAend
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
I guess you could write a function, but it might be easier to write a single line PHP statement like this:
$old = '5454';
$new = 'begin' . $old . 'end';
$old = '5454';
$new = 'begin' . $old . 'end';
ASKER
Thank you.