Skip to content

Instantly share code, notes, and snippets.

@FrancoStino
Last active March 1, 2021 14:37
Show Gist options
  • Save FrancoStino/48181ec5e302c3b7a65f3313250e95d2 to your computer and use it in GitHub Desktop.
Save FrancoStino/48181ec5e302c3b7a65f3313250e95d2 to your computer and use it in GitHub Desktop.
Combine multiple array
<?php
$livello1 = array("100");
$descrizione1 = array("In ottone");
foreach(array_combine($livello1, $descrizione1) as $livello => $descrizione)
{
echo '"/\\\b'.$livello.'\\\b/",'; # "\\b" serve per comprendere l'intera singola stringa e metcharla
echo '"'.$descrizione.'",';
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment