Jump to content

sonal4php

Members
  • Posts

    7
  • Joined

  • Last visited

    Never

Posts posted by sonal4php

  1. hi,

    i am trying a lil different code in regex on the same logic

     

    $string="get data(s):</td><td><em>MY DATA</em>";
    preg_match_all("/get data(s):</td><td><em>(.*)</em>/", $string, $out);
    print_r($out);
    

     

    i want to pick "MY DATA"

    but this isn't permits /td and /em in pattern..

    what's the solution..

     

    and can u please suggest some easy to learn regex tutorial...

    thanx

     

  2. i want to retrieve certain elements bound in same format in an html file.

    i have lot much raw data in this html file,

    i have stored this in string =$data

     

    and i am looking for such pattern:

    <td width='15%' valign=top>41    </td>
    

    among which 41 is desired result.

     

    note: 15% is not constant it can be 15%,25% and 35%

     

    i have many rows like this in html file, and i want to pick the same value which is bound in

    <td width='15%' valign=top>

    and

    </td>

    i am trying this code:

     

    preg_match_all("|<[td width='[0-9]{1}5%' valign=top>]+>(.*)</[/td>]+>|U",$data,$out,PREG_PATTERN_ORDER);
    print_r($out[1]);
    

    but i am not getting desired result

    can someone please help....

     

    thanx

  3. thanx guys 4 help
    even i understand that php is much more flexible to deal with this
    but i have a very long list of records, alongwith different kind of listings at a time
    i mean it's something like 7 columns and around 1000 rows
    and column needs to be summed up, total is displayed at around 15 times
    so to associate each column and make special SUM() for all, is just so time consuming to execute
    i thought, it would be much more simpler to use WITH ROLLUP
    so i turned to this
    well, and i am getting good results even
    but only prob is that, i want to display the total count fields in bold, so that user can differentiate it easily
    but i guess, i shud do something with php itself
    thanx once again 4 ur time

    gayatri


  4. hi guys
    i am new to this forum
    and just need some help from u guys
    i am using "with rollup" in my mysql query
    and it's running perfect
    what i want more is to display the 'total' fields in BOLD, which we get b'cuz of "with rollup"
    i have tried to pick up those particular entries using php language
    but no success
    i just wanna know, is there any thing, in the qry, which differentiates between normal rows o/p and total rows o/p
    as there r NULL entries for which we have applied GROUP BY
    i am using that NULL, but what abt the total count i get, i don't have any means to get the total count differently........
    plz help
    i mean anything which i can use in my php code

    thanx in advance
    sonal
×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.