reading a TXT file into variables
Posted: Wed May 22, 2013 5:40 am
Hi
I have the following format in a txt file
[text]EURO
1.1232
1.2836
US DOLLARS
1.4468
1.6485
AUSTRALIAN DOLLARS
1.4707
1.6913
BAHRAINIAN DINARS
0.5467
0.6283
BARBADOS DOLLARS
2.7550
3.2969
BRAZILIAN REAL
2.7477
3.4578
BRUNEI RINGGITS
1.8288
2.1017
BULGARIAN LEV
2.0866
2.5752[/text]
Im wanting read it in php and set variables to them i.e
using this for each currencies
Could anybody help me out please
I have the following format in a txt file
[text]EURO
1.1232
1.2836
US DOLLARS
1.4468
1.6485
AUSTRALIAN DOLLARS
1.4707
1.6913
BAHRAINIAN DINARS
0.5467
0.6283
BARBADOS DOLLARS
2.7550
3.2969
BRAZILIAN REAL
2.7477
3.4578
BRUNEI RINGGITS
1.8288
2.1017
BULGARIAN LEV
2.0866
2.5752[/text]
Im wanting read it in php and set variables to them i.e
Code: Select all
$currency = $line1;
$rate_buy= $line2;
$rate_sell= $line3;
Could anybody help me out please