Jump to content

meneimoh

Members
  • Content Count

    1
  • Joined

  • Last visited

Community Reputation

0 Neutral

About meneimoh

  • Rank
    Newbie
  • Birthday July 6

Contact Methods

  • Website URL
    http://zepstra.com/staff/franklin-fotang/
  • Skype
    ffotang

Profile Information

  • Gender
    Male
  • Location
    Buea, Cameroon
  • Interests
    Software Development, Hacking, System Analysis, Web Engineering

Previous Fields

  • Languages
    JavaScript, PHP,Java,Python,HTML,CSS

Recent Profile Visitors

The recent visitors block is disabled and is not being shown to other users.

  1. I had an array with duplicates. I removed the duplicates using PHP array_unique function. Then, I loop through the unique array using for loop (Sample Code below) and , I got an Undefined offset error. $even_numbers = array(22,66,24,22,36); $unique_even_numbers = array_unique($even_numbers); for($i=0; $i<count($unique_even_numbers); $i++){ echo $unique_even_numbers[$i].'<br>'; } The interesting thing is that I forgot I removed duplicates from the array somewhere (and therefore, an index). It took me something to figure out what was happening. I then used foreach. If I'm not missing something then I think it will be helpful if this is mentioned somewhere in the w3schools tutorial. It may help especially beginners.
×