Just saw your post,
Here's what i did yesterday.
I think it still has some issue with print.
dist[0] = readsensor(trigPin3, echoPin3); // parking distance for p1
dist[1] = readsensor(trigPin4, echoPin4); // p2
dist[2] = readsensor(trigPin5, echoPin5);
dist[3] = readsensor(trigPin6, echoPin6);
bool slot[4];
int i=0,j=0;
for(i=0;i<4;i++){
if (dist[i]>8){
slot[i]=false;
}
else{
slot[i]=true;
}
}
const char*str;
for(i=0;i<4;i++){
if(slot[i]){
str=strcat("P",(char*)i);
}
}
strcat(str,"Are Free");
lcd.setCursor(0,1);
lcd.print(str);