Hello everyone! Needing some help with styling a DOM parse. I have been toying around with the style but continue to end up with whitespace parse errors...
So first of all here is the working code
Sorry about the paste however the code snippet continued to display:
The code snippet in your post is formatted incorrectly. Please use the Code button in the editor toolbar when posting whitespace-sensitive text or curly braces.
Even though I was using the code button.
Currently the list parses in a direct row going down. I want it to display 4-5 elements on a line and then continue to the next row. I figured I would start with downsizing the elements however I am completely new to PHP and not sure how exactly to format CSS into the php element.
I sincerely appreciate all and any help or hints that will lead me on the correct direction.

3 Years
Discussion Span
Last Post by nauticalmac
            // Include the library to use it.

            // Get div from site. ... Need to implement user selected queries.

            $html = file_get_html('http://www.championselect.net/champ/jinx');

            // Put all of the <a> tags into an array named $result
            $result = $html -> find('h2,img[class=CS_Champ_Image],.counterName' )

            // Run through the array using a foreach loop and print each link out using echo
            foreach($result as $element) {
                echo $element."   ";

    I tried to add:

        <style type="text/css">
        .size {


         echo "<p class=size">$element."   "</p>;

    With errors...
    if ($_SERVER['REQUEST_METHOD'] == 'POST' && isset($_POST['input']) {
    if (is_int($_POST['input']) { $input = $_POST['input']; }
    <form method='post' action=''>
    <input name='input' type='text' id='input' size='10 maxlength='10' />
    <input type='submit'  name='submit' value='submit' />

Incorrect sysntax above:
echo "<p class=size">$element." "</p>;
should be:
echo "<p class=\"size\">".$element."</p>";

Try posting one problem at a time with a bit more info on what you are trying to do.

This topic has been dead for over six months. Start a new discussion instead.
Have something to contribute to this discussion? Please be thoughtful, detailed and courteous, and be sure to adhere to our posting rules.