Php simpleXML基于2个字段的值进行选择

Php simpleXML基于2个字段的值进行选择,php,simplexml,Php,Simplexml,我有一些xml定义了住宅或商业物业的列表。它们也被分为出售或出租。以下是XML的一个示例: <property> <property_ref>768</property_ref> <building_number></building_number> <address1>Celia Fiennes House, 8-20 Well Street, London, E9 7PX</address1

我有一些xml定义了住宅或商业物业的列表。它们也被分为出售或出租。以下是XML的一个示例:

<property>
    <property_ref>768</property_ref>
    <building_number></building_number>
    <address1>Celia Fiennes House, 8-20 Well Street, London, E9 7PX</address1>
    <address2>Celia Fiennes House</address2>
    <address3>8-20 Well Street</address3>
    <town>London</town>
    <county>London</county>
    <region>London.</region>
    <country>ENGLAND</country>
    <postcode>E9 7PX</postcode>
    <property_types>

        <type_description>Office</type_description>

    </property_types>
    <job_type>Disposal (Sale/Let)</job_type>
    <property_status>To Let</property_status>
但是,如何检查作业类型的值呢


谢谢你的帮助

你不能也检查一下这样的工作类型吗

if ($selectProperty && (string)$property->job_type == 'my job type')
  {
    // show the property on this page...
在检查类型描述之前或之后检查作业类型,然后将每次检查的布尔结果与逻辑and运算符相结合,这似乎非常简单

if ($selectProperty && (string)$property->job_type == 'my job type')
  {
    // show the property on this page...