Home>Article>PHP Framework> What does eq mean in thinkphp
In thinkphp, eq is a comparison tag that can compare the values of the tag parameters name and value. If the values of name and value are equal, the content between the eq tags will be output. The syntax is "927849d4a0560023b38c3b440bb24d14Content81e158ec091e6e6e4ad2eb67327f19fd".
The operating environment of this article: Windows 10 system, ThinkPHP version 5, Dell G3 computer.
The eq tag in thinkphp seems not commonly used, but it is essential
For example, like a certain status, switch Wait, you can't directly read the fields in the database to the customer, and the customer can't understand it, right?
So we can use the eq tag to solve this little problem.
For example: I have a status field in the database, indicating a certain status. I stipulate it: 0 is inactive, 1 is activated
Now I want to display the data of the entire table to Users look, what should I do?
One thing that is certain is that we cannot read 0 and 1 directly. In the front-end template,
looks like this: b6c5a531a458a2e790c1fd6421739d1c{$vo.status}b9e78f341e330ef251737460aceb4652 tags will be output. The name here should not be written as {$vo.status }
Otherwise, no matter how you write it, it will be the value of c0fcab944ac202ff37d8cba5b4ade40d
Of course, this is just one of the comparison tags in thinkphp. For more information, please refer to the thinkphp manual
<比较标签 name="变量" value="值"> 内容 比较标签>
Recommended learning: "PHP Video Tutorial"
The above is the detailed content of What does eq mean in thinkphp. For more information, please follow other related articles on the PHP Chinese website!