Jump to content

Panjabel

Members
  • Posts

    66
  • Joined

  • Last visited

    Never

Posts posted by Panjabel

  1. <?php 
    $list1 = array("cv1","cv2","cv3"); 
    $list2 = array("cv1s","cv2","cv3d"); 
    foreach($list1 as $list) 
    { 
    //if $list exists in array $list2 i want to print it, else not to print it 
    } 
    ?> 

    I've searched for this but i found, if i'm searching for "cv1" in "cv1" it finds it but if i'm searching for "cv1" in "cv1s" it doesn't

    Thanks in advance

  2. Hello,

    $ok = array();
    array_push($ok, "value1");
    foreach($ok as $value)
    {
    array_push($ok, "value2");
    print $value;
    }
    // it won't print "value2"

    i want the script to read all values from array, in case there will be added a new value, to read it at the end and so on until there is no more values to read,

    Thanks

  3. Hello

    i have table members with many users and comments

    i want to select unique users and order them by number of comments

    select distinct(userid) from members order by count(comments) desc

    the command will display the same users many times, not unique users.

    what's wrong in the query ?

×
×
  • 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.