This question already has an answer here:
Hi so i have a ternary operator that I used to assign a variable , i have used it on my other functions and it is working but in this one it is not , i compared the both of them and there is nothing different about them . can someone tell me whats the problem here ? here is the code for it
$sesh_id = session('id');
$filter = $sesh_id == 1 ? "Reserved" : $sesh_id == 2 ? "Borrowed" : "Returned";
the sesh_id is getting the value so i really dont know what triggers the problem .
from Newest questions tagged laravel-5 - Stack Overflow https://ift.tt/367Ipg7
via IFTTT
Aucun commentaire:
Enregistrer un commentaire