Skip to content

Instantly share code, notes, and snippets.

@abedcodes
abedcodes / _render.php
Created September 25, 2021 12:23
Simple PHP snippet to render Multi-Choice Questions in a webpage
<!-- this is the main snippet -->
<form action="./assert.php" method="post">
<?php foreach($MCQs as $MCQ): ?>
<p><?php echo $MCQ['stem']; ?></p>
<?php foreach($MCQ['choices'] as $choiceIndex => $choice): ?>
<label for="q_<?php echo $MCQ['id']; ?>_c_<?php echo ++$choiceIndex; ?>">
<?php echo $choice; ?>
</label>
<input
@abedcodes
abedcodes / installing_upgrading_composer_ubuntu.md
Last active October 26, 2021 13:28
installing/upgrading composer on Ubuntu

i start to explain how to update composer, for installation start from step 3.

0. if you already installed composer you should be able to get composer version by running composer --version. if installed go to step 1.

1. run composer self-update if composer got updated then you are good to go but if you get error saying this command is undefined,