anyone know how to insert characters at the front of a string? say for example if i had the string "cde" and wanted to insert the charachters 'a' and 'b' at the front to make it "abcde".
i know array_push will insert charcters but it puts them at the end. anyone know of a function that will do what im trying to do?
string manipultion
Moderator: General Moderators
- Chris Corbyn
- Breakbeat Nuttzer
- Posts: 13098
- Joined: Wed Mar 24, 2004 7:57 am
- Location: Melbourne, Australia
Code: Select all
$string = 'cde';
$appender = 'ab';
$newstring = $appender.$string;