function searchExactString($word) { $containers = []; $file = file_get_contents('search.json'); $dictionary = json_decode($file, true); // decode the JSON into an associative array foreach ($dictionary as $key => $value) { if (starts($key, $word)) { echo '<br>' . $key . '=> ' . $value; } } $search_done = true; }
function prepareHref($link) { $href = $link->getAttribute('href'); $href = str_replace('http://learnyousomeerlang.com/', '', $href); if (contains($href, '#')) { if (!starts($href, '#')) { $href = str_replace('#', '.html#', $href); } } else { $href = $href . '.html'; } $link->setAttribute('href', $href); }
function geturl($pfad) { global $links; $r = explode("/", trim($pfad, "/")); $first = starts($links[$r[2]]['url']); $trailer = trailer($first[$r[3]]['url']); return mediaplayer($trailer[$r[4]]['trailer']); }
public function starts($column, $value) { $this->model->setCondition(starts($column, $value)); return $this; }