DEV Community

Cover image for How to create a Rest API in PHP
ShadabShaikhAzmi
ShadabShaikhAzmi

Posted on

1 2

How to create a Rest API in PHP

<?php
$result[] = ['name'=>'xyz','mobileno'=>9876543210,'address'=>"Abc 7689"];
echo json_encode($result);
?>

Top comments (0)

šŸ‘‹ Kindness is contagious

DEV is better (more customized, reading settings like dark mode etc) when you're signed in!

Okay