Flowchart (ISO 5807)
Source code
PHP
function indexOf($a, $key) {
for ($i = 0; $i < count($a); $i++) {
if ($a[$i] === $key) {
return $i;
}
}
return -1;
}The editor opens with this code — change it and the chart redraws.
- Language
- PHP
- Constructs
- loop + return index
- Topic
- Algorithms
- Formats
- Word, Visio, draw.io, PDF, SVG