Jump to content

Leaderboard

Popular Content

Showing content with the highest reputation on 11/21/2020 in all areas

  1. try $arr = array("test", "test", "hello", "test", "world", "world", "world", "hello", "test"); $prev = ''; $results = []; $j = 0; foreach ($arr as $i => $v) { if ($v != $prev) { $j = $i; $results[$j] = 1; $prev = $v; } else { $results[$j]++; } } foreach ($results as $k => $v) { echo "$arr[$k] : $v <br>"; } Result: test : 2 hello : 1 test : 1 world : 3 hello : 1 test : 1
    1 point
  2. if array == array[i-1] then you have adjacent duplicates
    1 point
  3. The link to the manual has examples.
    1 point
  4. That's it. "-p X:Y" maps the host's X to the container's Y. Make sure the container (and Apache) is running, and that you're browsing to localhost:8080. You should definitely get a connection, even if something else doesn't work.
    1 point
This leaderboard is set to New York/GMT-04:00
×
×
  • 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.