Closed gwenael74 closed 6 years ago
Sorry for the long time waiting.
Your question is about PHP syntax. the code name == 'Sam' && age === '12'
is only valid in JavaScript but not in PHP, a quick refine should be something like this: $name == 'Sam' && $age === '12'
. Then you should encounter another problem what these variables ($name and $age) are not presented in local , I think you need to redesign the xif
helper to make it work for both PHP and JS.
It's what I did actually, I redesigned it Thanks you
It's what I did actually, I redesigned it Thanks you
How did you fixed that, i'm also interested because i'm facing the same issue
The PHP Code:
The Issue:
Hello, I have a question. I tried all this afternoon to recreate this javascript helper "xif": https://gist.github.com/akhoury/9118682 (which work fine on my client side)
Howerver In PHP side, I didn't handle to make it work (my other helpers are working fine, only this one in which I've got difficulties).
How to create such helper which could work with any expression? (I am on the master branch, updated yesterday)
Thanks you for your help Gwen