phpQuery find on div style

284 views Asked by At

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

There are 1 answers

0
nageeb On

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;'