Lets Start,
Step 1:Create index.php file and create array as below.
<?php $data="#1231324,#12345,#76827,#14749"; ?>
<?php $data="#1231324,#12345,#76827,#14749"; $array=json_encode(explode(',', $data)); $arr = json_decode($array); ?>
<?php $data="#1231324,#12345,#76827,#14749"; $array=json_encode(explode(',', $data)); $arr = json_decode($array); foreach($arr as $imgpos => $value){ echo "<h1>".$value."</h1>"."<br>"; } ?>
<!doctype html> <html lang="en"> <head> <title>How To Remove Quote In String And Convert To Array In PHP</title> <meta charset="utf-8"> <meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no"> <!-- Bootstrap CSS --> <link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/bootstrap/4.0.0/css/bootstrap.min.css" integrity="sha384-Gn5384xqQ1aoWXA+058RXPxPg6fy4IWvTNh0E263XmFcJlSAwiGgFAW/dAiS6JXm" crossorigin="anonymous"> <link rel="stylesheet" href="index.css"> <script src="https://ajax.googleapis.com/ajax/libs/jquery/3.1.0/jquery.min.js"></script> </head> <body> <div class="container"> <div class="text-center"> <br><br><br><br> <h4> How To Remove Quote In String And Convert To Array In PHP </h4> </div> </div> <main class="py-4" style="margin-top: 20px"> <div class="flex-center position-ref full-height"> <div class="container"> <?php $data="#1231324,#12345,#76827,#14749"; $array=json_encode(explode(',', $data)); $arr = json_decode($array); foreach($arr as $imgpos => $value){ echo "<h1>".$value."</h1>"."<br>"; } ?> </div> </div> </main> </body> </html>