Answer the question
In order to leave comments, you need to log in
Php operator substr and assignment return empty variable?
There is a cycle
foreach($array_pages as $v)
{
$quantity_elements++;
if (!empty($v['URL'])) {
$vUrl = substr($v['URL'], -1);
if ($vUrl != '/') {
$v['URL'] = $v['URL'] + '/';
print_r($v['URL']);
}
}
}
Answer the question
In order to leave comments, you need to log in
The answer is already there, but for the future to the author, wardump variables and there will be fewer questions
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question