Results 1 to 3 of 3
  1. #1
    Join Date
    Oct 2003
    Posts
    11

    Unanswered: accessing array elements

    Hi,

    how can I access array elements in a case insensitive manner?
    for example, i want $row["TYPEID"] to be the same as $row["typeid"]

    Thanks,
    Rovshan

  2. #2
    Join Date
    Mar 2002
    Posts
    22
    why would you want to?
    is this the type of thing you're looking for?

    $this = 'THIS';
    $what = array(this, that);

    if(in_array($this,$what, true)){
    echo ''.$this.' is here<br>';
    } elseif (in_array(strtolower($this),$what, true)); {
    echo ''.strtolower($this).' is here<br>';
    }

    if(in_array($this,$what, true)){
    echo ''.$this.' is here';
    } else {
    echo ''.$this.' is not there';
    }

    hope this helps...

  3. #3
    Join Date
    Oct 2003
    Posts
    11
    the problem was that i was migrating an application from mysql to oracle. i used lower case and upper case letters for column names in mysql. but in oracle they are all uppercase. because of this i had to go through about 160 files and make changes. i wrote a little program that used regular expressions to do it recursively in a folder. so, the problem is solved now. thank you.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •