I want to convert octal sign like 46
to normal sign like &
.
The problem is that the input is created with preg_match_all()
, put into an array and then retrieved.
If I'd manually input the 46
octal notation into variable with double quotes, like
$input="46";
then PHP would convert it nicely.
But when I have it into an array from preg_match_all()
, it returns it unconverted.
I want to convert it because I want to query database (mysql) that have records with "&" sign as ampersand.
See Question&Answers more detail:
os 与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…