How to replace a line in the script using php?

Good day!
There is a widget with Facebook (Page) how to make users register on the website, at registration indicated on your ID band, ID rushed in the database, and the widget code, took ID in the database and substituted instead of the original?

<div class="fb-page" data-href="https://www.facebook.com/facebook" data-tabs="timeline" data-small-header="false" data-adapt-container-width="true" data-hide-cover="false" data-show-facepile="true"><blockquote cite="https://www.facebook.com/facebook" class="fb-xfbml-parse-ignore"><a href="https://www.facebook.com/facebook">Facebook</a></blockquote></div>
July 2nd 19 at 14:16
1 answer
July 2nd 19 at 14:18
<?php
 $from = array('%id%', '%group%', '%etc%');
 $to = array(1, 43, 'smth');
 $str = 'https://facebook.com/...?id=%id%&group=%group%&etc=%etc%';
 $str = str($from, $to, $str);</code-->
How is the connection to the database? - Israel_Lynch57 commented on July 2nd 19 at 14:21

Find more questions by tags PHPAPIFacebook