Question: I have the following code to display the 3 latest blog posts. At the moment the blog posts are appearing right to left instead of left to right.

```
<?php $counter = 3;
   $recentPosts = new WP_Query();
   $recentPosts->query("showposts=3");

?>
<?php while ($recentPosts->have_posts()) : $recentPosts->the_post(); ?>
<div class="box<?php echo $counter--; ?>">

```

How do I make the latest blog appear first? By first I mean on the left instead of the right. Appreciate any help!

Answer: 
I have one solution by passing array to your function and then creating char \*

```
    const char c1[]={0x01};  
    NSString *s1 = [[NSString alloc] initWithCString:c1 encoding:NSUTF8StringEncoding]; //convert into string 

    const char c2[]={0x02};
    NSString *s2 = [[NSString alloc] initWithCString:c2 encoding:NSUTF8StringEncoding]; //convert into string 

    const char c3[]={0x03};
    NSString *s3 = [[NSString alloc] initWithCString:c3 encoding:NSUTF8StringEncoding]; //convert into string 

    NSArray *arr = [NSArray arrayWithObjects:s1,s2,s3,nil]; // adding all strings 
    [s1 release];
    [s2 release];
    [s3 release];

```

Now function would be like this where u will pass arr(NSArray):

```
-(char *)mountLVparams:(signed char *)initData :(NSArray *)arrChars :(signed char *)codeWard
{

int count = [arrChars count];
char *cargs = (char *) malloc(sizeof(char) * (count + 1));
//cargs is a pointer to 4 pointers to char

int i;
for(i = 0; i < count; i++) {
    NSString *s = [arrChars objectAtIndex:i];//get a NSString
    const char *cstr = [s cStringUsingEncoding:NSUTF8StringEncoding];//get cstring
    int len = strlen(cstr);//get its length
    char *cstr_copy = (char *) malloc(sizeof(char) * (len + 1));//allocate memory, + 1 for ending '\0'
    strcpy(cstr_copy, cstr);//make a copy
    cargs[i] = cstr_copy;//put the point in cargs
}
cargs[i] = NULL;
NSLog(@"%c | %c| %c ",cargs[0],cargs[1],cargs[2]);
return cargs;
}

```

Credit for creation of char from array of string goes to @yehnan follow [objective-c nsarray to c array](https://stackoverflow.com/questions/3091251/objective-c-nsarray-to-c-array)

Use like this:

```
  char *cs = [self mountLVparams:(your arguments here and pass array here)];
    NSLog(@"%c | %c | %c",cs[0],cs[1],cs[2]);

```
parameter `c` is the pointer pointing to your character array. The pointer will point the first address of the array hence it is by default `c[0]`. 

You can pass it as NSstring. `[NSString stringWithFormat:%s,c]`.