1
I have strings:
$str1 = "nome = stack";
$str1 = "id <5";
$str3 = "senha != over";
How do I pick up the string there in the operator or in space (when there is no space followed by the operator it will separate in the operator)? Then I’d be like this:
$str1 = "nome = "; //separou no espaço seguido de operador
$str1c = "stack";
$str2 = "id <"; //separou no operador
$str2c = "5";
$str3 = "senha != ";
$str3c = "over";
I didn’t put code because I don’t know how to start.
What would an "operator" be in this case? Would any string be non-alphanumeric and also not white space? My suggestion is to use regex, I will try to assemble an example.
– mgibsonbr
It would be < > or =, I’m almost getting here after looking at the PHP documentation, only when I have <= => etc (with two characters) that is not working
– Leonardo