Simple Currency Converter in PHP API

Simple Currency Converter in PHP API

In this Post We Will Explain About is Simple Currency Converter in PHP API With Example and Demo.Welcome on – Examples, The best For Learn web development Tutorials,Demo with Example! Hi Dear Friends here u can know to Currency Converter Using PHP Example

In this post we will show you Best way to implement Currency conversion in PHP Using Google API, hear for How to Create a Simple Basic Currency Converter in PHP with Download .we will give you demo,Source Code and examples for implement Step By Step Good Luck!.

Getting started:

First of all you have to simple download as well as install XAMPP server / Wampp server or any local server that run PHP Source code. In This POST I used XAMPP server as my local any server, So this here the link for main Download XAMPP server

Also Read :   How to use AngularJS with Laravel Blade Together

The Main Function

This Scripts Data contains the main function of the web application, This Scripts will try to step by step convert the HTML input txtdigit then convert it based on the conversion currency that use. To make this just write these div block of Scripts in the text main editor,And then name It PHP file as live_convert.php

		$txtdigit = $_GET['live_txt_digit'];
		$currency = $_GET['currency'];
		if($txtdigit != ""){
				case "Dollar":
					$myoutput = $txtdigit * 51.52;
					echo"<strong><label class='text-success' style='font-size:28px;'>$".$myoutput."</label></strong>";
				case "Euro":
					$myoutput = $txtdigit * 63.62;
					echo"<strong><label class='text-success' style='font-size:28px;'>€".$myoutput."</label></strong>";
				case "Pound":
					$myoutput = $txtdigit * 72.24;
					echo"<strong><label class='text-success' style='font-size:28px;'>£".$myoutput."</label></strong>";
				case "Chinese Yuan":
					$myoutput = $txtdigit * 8.12;
					echo"<strong><label class='text-success' style='font-size:28px;'>¥".$myoutput."</label></strong>";
				case "Japanese Yen":
					$myoutput = $txtdigit * 0.47;
					echo"<strong><label class='text-success' style='font-size:28px;'>¥".$myoutput."</label></strong>";

The Main Interface

This is the main interface that display the myoutput of the currency conversion,to make this just write these scripts inside your text file, After That save it as index.php

Also Read :   Difference between break and continue in PHP | Break and Continue

<!DOCTYPE html>
<html lang="en">
	<title>PHP - Simple Currency Converter</title>
		<link rel="stylesheet" type="text/css" href="css/bootstrap.css"/>
		<meta charset="UTF-8" name="viewport" content="width=device-width, initial-scale=1"/>
	<nav class="live navbar navbar-default">
		<div class="live container-fluid">
			<a class="navbar-brand" href="<a href=""></a>
	<div class="live24u col-md-3"></div>
	<div class="live24u col-md-6 well">
		<h3 class="text-success">Live PHP - Simple Currency Converter Example</h3>
		<hr style="border-top:1px dotted #3d3d3d;"/>
		<form method="GET" action="">
			<div class="form-inline">
				<input class="live24u form-control" type="text" name="live_txt_digit"/>
				<label>Select Any Currency: </label>
				<select name="currency" class="live24u form-control">
					<option value="">Select an Currency</option>
					<option value="Dollar">Dollar</option>
					<option value="Euro">Euro</option>
					<option value="Pound">Pound</option>
					<option value="Chinese Yuan">Chinese Yuan</option>
					<option value="Japanese Yen">Japanese Yen</option>
				<br /><br />
				<strong><button type="submit" name="form_submit_btn" class="btn btn-success form-control" style="width:30%;">Convert</button></strong>
				<br />
				<?php require 'live_convert.php'?>

There for you have it we all steps successfully created a Simple Currency Converter in PHP. We hope that It simple post help you to what you are Learning for. For more updates and blogs just kindly visit It site. Good Luck!!

Also Read :   JSON - Introduction using PHP-Angularjs -javascript

You are Most welcome in my youtube Channel Please subscribe my channel. and give me FeedBack.
More Details……
Angularjs Example


I hope you have Got What is PHP – Simple Currency Converter And how it works.I would Like to have FeedBack From My Blog( readers.Your Valuable FeedBack,Any Question,or any Comments about This Article( Are Most Always Welcome.