Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

Fixing lookup function

  • Loading branch information...
commit f0013ead2052b55bdf250a8f17efd3f10a35eb4e 1 parent 9fbe35a
@jdsharp authored
Showing with 2 additions and 2 deletions.
  1. +2 −2 go.php
View
4 go.php
@@ -5,8 +5,8 @@ function lookup($key) {
foreach (file('urls.txt') as $line_num => $line) {
$line = trim($line);
$eq = strpos('=', $line);
- $k = substr($key, 0, $eq);
- $v = substr($key, $eq+1);
+ $k = substr($line, 0, $eq);
+ $v = substr($line, $eq+1);
if ($k == $key) {
return $v;
Please sign in to comment.
Something went wrong with that request. Please try again.