There is a php script that outputs articles from a database (in theory). But in practice, he displays only the first entry.
<?php @mysql_connect('localhost','admin','123') or die('WRONG CONNECTION('.mysql_error()); mysql_select_db(iskstore); $sql=mysql_query("SELECT * FROM `articles_db`"); $result=mysql_fetch_array($sql); $htmlformat = '<div class ="article-%s"><div class="a_title"><h2>%s</h2></div><div class="a_text">%s</div></div>'; echo sprintf($htmlformat, $result['a_id'], $result['a_title'], $result['a_text']); @mysql_close() ?> I do not specifically understand PHP and there is a suspicion that it was necessary through fetch_assoc () but with it I generally get an error. How to make the script unload all the records?

arrayfetch_assocreally simpler ..... secondly, it is necessary to process it in a loop. and in the documentation there are quite examples of this associated with it ...... and thirdly: do not use themysqlextension - it is outdated ..... usemysqliorpdo....... fourthly: do not use stubs in the form of@otherwise the chief and the senior programmer will rape you - Alexey Shimansky