Monday, 24 July 2017

Can't use function return value in write context? PHP

I keep getting the following error with this code:




Fatal error: Can't use function return value in write context in
/home3/laarrkin/public_html/streamconcerns.com/devwork/login-check.php
on line 48





//StringSplitters
$data_a = explode('hp/details">', $data2);
$data_b = explode(', you', $data_a[1]);
$data_c = explode(' [', $data_b[0]);
$data_d = explode(' ', $data_c[0]);
$data_e = explode(']', $data_c[1]);
$data_f = explode('$data_g = explode('', $data2);

$data_h = explode('', $data_g[1]);
$data_i = explode('
', $data_h[1]);
//Function
function yearlevel() {
$str = $data_i[0];
if (($strlen($str) = 6)) {//Line 48
$k = str_split($str, 3);
$k2 = str_split($k[1], 1);
if ($k2[0] == "1") {
return "11";

}
if ($k2[0] == "2") {
return "12";
}
if ($k2[0] == "3") {
return "13";
}
} else {
return "10";
}

}

No comments:

Post a Comment

casting - Why wasn't Tobey Maguire in The Amazing Spider-Man? - Movies & TV

In the Spider-Man franchise, Tobey Maguire is an outstanding performer as a Spider-Man and also reprised his role in the sequels Spider-Man...