Question: I added the extension below to my code for IOS devices extension String { function my64Base() -> String { return Data(self.utf8).base64EncodedString(); } } but it

I added the extension below to my code for IOS devices

extension String { function my64Base() -> String { return Data(self.utf8).base64EncodedString(); } }

but it says there is error syntax error It looks like it is not php code can you help how to write a php extension for IOS devices

this is the code

include "connect.php";

extension String { function my64Base() -> String { return Data(self.utf8).base64EncodedString(); } }

$sql ="SELECT id, imagetype, BookPic, BookName, PayPal, BookPDF FROM `textsource` .`addbooks`";

$result = $connect->query($sql);

if($result->num_rows>0){

echo "

";

while($row = $result->fetch_assoc()){

$image = "data:image/jpeg; charset-utf8; base64,"; $opencode = my64Base($row['BookPic']); echo "

".$row['BookName']." 10 CAD

".$row['PayPal']."
";

}

echo "

";

}

?>

Please write me a php extension code ASAP

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!