in reply to output div tag inside html

how i can get all output per div

Do you mean all the fields returned by SELECT * ... ?

while (my @row = $search->fetchrow_array()) { print "@row\n"; }
poj

Replies are listed 'Best First'.
Re^2: output div tag inside html
by bigup401 (Pilgrim) on Sep 13, 2018 at 17:55 UTC

    this is wat i mean now

    i want to get

    <li> #Foo </li> <li> #bar </li> <li> #moo </li>
    use CGI::Pretty ":standard"; @names = ('Foo', 'Bar', 'Moo'); my $str = join(" ",@names); $data = li ( div({"class='inforno'"}, "<img src='inforno>'"), div({"class='inforno'"}, "<a href='#' class='inforno'>$str< +/a>"), span({"class='inforno'"}, "<a href='#' class='inforno'> Edit user </a>") ); print "$data\n";

      You can’t get pretty printing today without hoops. Hoops == code smell. This prints what you want without spacing. Templates or HEREDOCs are better by far for what you want; as I think might have already been mentioned. Maybe. :P

      use strict; use CGI ":standard"; my @names = ('Foo', 'Bar', 'Moo'); print li([ map "#$_", @names ]); __END__ <li>#Foo</li> <li>#Bar</li> <li>#Moo</li>

        i dont mean to print the li only as u see my script is to print the whole li inside li there is div as u see example

        when u run the script u will see the output

        i just want to output the whole

        i want to get <li> #Foo with all div and span inside here </li> <li> #bar with all div and span inside here </li> <li> #moo with all div and span inside here </li> [download] use CGI::Pretty ":standard"; @names = ('Foo', 'Bar', 'Moo'); my $str = join(" ",@names); $data = li ( div({"class='inforno'"}, "<img src='inforno>'"), div({"class='inforno'"}, "<a href='#' class='inforno'>$str< +/a>"), span({"class='inforno'"}, "<a href='#' class='inforno'> Edit user </a>") ); print "$data\n";