How to pass parameters to javascript

how to write a php code to pass components, client-id and data-client-token to js src="https://www.paypal.com/sdk/js?components=hosted-fields,buttons&client-id=******" data-client-token="*******"

Maybe this is what your looking for:

PHP:

$clientID = '123';
$clientToken = 'ABC';

JS:

src="https://www.paypal.com/sdk/js?components=hosted-fields,buttons&client-id="<?=$clientID>" data-client-token="<?=$clientToken>"
Sponsor our Newsletter | Privacy Policy | Terms of Service