ProcessWire - Debugging Snippets: Unterschied zwischen den Versionen

Aus Wikizone
Wechseln zu: Navigation, Suche
(Die Seite wurde neu angelegt: „<syntaxhighlight lang="php"> //get all the fields: $all_fields = $page->fields; foreach($all_fields as $field){ $out .= "{$field->name}, "; } </syntaxhighlight>“)
 
Zeile 1: Zeile 1:
 +
== Alle Feldnamen einer Seite ausgeben ==
 
<syntaxhighlight lang="php">
 
<syntaxhighlight lang="php">
 
//get all the fields:
 
//get all the fields:

Version vom 1. August 2018, 12:47 Uhr

Alle Feldnamen einer Seite ausgeben

//get all the fields:
$all_fields = $page->fields;
foreach($all_fields as $field){
  $out .= "{$field->name}, ";
}