Jump to content

help with php concatenating


unknown1

Recommended Posts

Need help with php concatenating.

 

$page = array('1','2','3','4','5','6','7','8','9','10','11','12',
'13','14','15','16','17','18','19','20','21','22','23','24','25','26','27','28','29','30');

 
$city = array('ACTON','ADELANTO','AGOURA HILLS','ALAMEDA','ALAMO','ALBANY','ALHAMBRA','ALISO VIEJO');
 
// the code below invalid...and I can't seem to write it so it will work. Any ideas?
//if you can't see the issue...it's because of the ".$city.". I know it should be ".$city." but it's suppose to be a sub-domain and with the 
//extra dot it gives off an error.
 
$html = file_get_html('http://".$city.".somesite.com/buy-and-sell-Page".$pg."ZZisCitySearchtrue');
 
 

Edited by unknown1
Link to comment
Share on other sites

try this one

$html = file_get_html("http://".$city."somesite.com/buy-and-sell-Page".$pg."ZZisCitySearchtrue");

yu don't need single innerted comma to concat.. Use " " this instead...

 

If u use ' '  then it echo out as it is without evaluating the php code...

 

Comment if u need any help...

Link to comment
Share on other sites

try this one

$html = file_get_html("http://".$city."somesite.com/buy-and-sell-Page".$pg."ZZisCitySearchtrue");

yu don't need single innerted comma to concat.. Use " " this instead...

 

If u use ' '  then it echo out as it is without evaluating the php code...

 

Comment if u need any help...

 

 

$html = file_get_html("http://".$city."somesite.com/buy-and-sell-Page".$pg."ZZisCitySearchtrue");
// doesn't work because it should be a sub domain like
$html = file_get_html("http://".$city.".somesite.com/buy-and-sell-Page".$pg."ZZisCitySearchtrue");
 
//but because of the extra . in the sub domain it produces an error.
 

Edited by unknown1
Link to comment
Share on other sites

But Thanks!! I thought I tried it like

$html = file_get_html("http://".$city.".somesite.com/buy-and-sell-Page".$pg."ZZisCitySearchtrue");

already...

 

$html = file_get_html("http://".$city."somesite.com/buy-and-sell-Page".$pg."ZZisCitySearchtrue");
// doesn't work because it should be a sub domain like
$html = file_get_html("http://".$city.".somesite.com/buy-and-sell-Page".$pg."ZZisCitySearchtrue");
 
//but because of the extra . in the sub domain it produces an error.
 

Link to comment
Share on other sites

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.