-2

while developing php base web project if your using base64 encoding yo may need to encode your variables using javascripts. hope this will be helpful to your question

Sampath M Jay
  • 117
  • 2
  • 12
  • 1
    Please [***search***](/search?q=%5Bjs%5D+convert+to+base+64) before posting. It's always important, but it's particularly important to do a thorough job of that when you're self-answering. More about searching [here](/help/searching). – T.J. Crowder May 04 '20 at 08:51

1 Answers1

-1

If you need to convert string value to base_64 using java scripts you can use btoa($string); also if you need to atob($string); function to achieve your goal. to use these function there is nothing to do like importing any libraries or anything use you can simply call to this methods.

Sampath M Jay
  • 117
  • 2
  • 12