-1

I can not understand how to search for information in div style.

Example:

<div style='font-size:19px;line-height:22px;color:#000;font-weight:bold;'><h1 title='lamborghini aventador 640' style='margin-top:0;'>lamborghini aventador</h1></div>
<div style='color:black;font-size:16px;line-height:13px;margin-top:12px;'>
Article: 640
</div>
1
  • I would recommend not using inline styling. Commented Dec 20, 2017 at 18:44

1 Answer 1

0

Documentation is your friend https://code.google.com/archive/p/phpquery/wikis/Manual.wiki

From the phpquery documentation on attributes (https://code.google.com/archive/p/phpquery/wikis/Attributes.wiki)

For a div such as

<div style='font-size:19px;line-height:22px;color:#000;font-weight:bold;'>

Calling $styles = pq('div')->attr('style');

Variable $styles would contain 'font-size:19px;line-height:22px;color:#000;font-weight:bold;'

Sign up to request clarification or add additional context in comments.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.