Hello,

I've got a variable string ($policies) of CDATA, that is dynamically generated,
what I am trying to do is to find a way to separate the various divs into separate variables.
For example the following string will have to be split into $policy_hotel_pets, $policy_children, etc.. each variable storing its respective <div> element:

<div class="policies">
  <div class="POLICY_HOTEL_PETS">Pets are not allowed. </div>
  <div class="POLICY_CHILDREN">All children are welcome. All children under 6 years stay free of charge when using existing bedding.
All children under 2 years stay free of charge for cots.
All older children or adults are charged AED 100.00 per night and person for extra beds.
Maximum capacity of extra beds/babycots in a room is 1.
</div>
  <div class="POLICY_CANCELLATION">If cancelled up to 1 day before the date of arrival,  no fee will be charged. If cancelled later or in case of no-show, the first night will be charged.

</div>
  <div class="POLICY_HOTEL_INTERNET">Wireless internet is available in the hotel rooms and costs  AED  14.00 per  hour. </div>
  <div class="POLICY_HOTEL_EXTRACHARGES">VAT  is not applicable. Service charge is included.
City/tourist tax is included.
</div>
  <div class="POLICY_PREPAY">No deposit will be charged. </div>
  <div class="POLICY_HOTEL_MEALPLAN">Continental breakfast is included in the room rate. Buffet breakfast is not included and costs AED 30.00 per person.
</div>
  <div class="POLICY_HOTEL_PARKING">No parking available. </div>
</div>

Thanks for your help!

Recommended Answers

All 2 Replies

Anybody ? help :/

are you tring to read the html? could you explain what you want to do in more detail. i have no idea what you are wanting to do.

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.