Skip to content

Instantly share code, notes, and snippets.

View will1471's full-sized avatar

William Redman will1471

  • West Midlands, UK
View GitHub Profile
@justsml
justsml / fetch-api-examples.md
Last active August 20, 2024 19:31
JavaScript Fetch API Examples
@farinspace
farinspace / combos.php
Last active November 4, 2024 11:21
Recursive functions, I can never find exactly what I need in a pinch
<?php
function combos($data, &$all = array(), $group = array(), $val = null, $i = 0) {
if (isset($val)) {
array_push($group, $val);
}
if ($i >= count($data)) {
array_push($all, $group);
} else {
foreach ($data[$i] as $v) {