Take the 2-minute tour ×
Stack Overflow is a question and answer site for professional and enthusiast programmers. It's 100% free, no registration required.

I'm new in php:

how to replace array A values with array B values in php. If array A size is larger than array B.

Ex: Array A size is 10 -> ie. {'1','2','3','4','5','6','7','8','9','10'} Array B size is 5 -> ie. {'1','2','3','4','5'}

then, how to replace array B values from 5th position of the array A values

Pls anybody clear my doubt with php coding.

Thanks in advance friends.

share|improve this question
3  
I am sure that we can help but the question is not clear, can you clarify it by giving the desired result please? –  Timo Huovinen Jan 11 '14 at 11:13
    
give us an example of your desired result –  Alireza Fallah Jan 11 '14 at 11:21

1 Answer 1

up vote -1 down vote accepted

It's difficult to determine what you are trying to achieve from your post, but i would take a look at array_diff and array_merge.

share|improve this answer
    
Thanks Paul Osborne. –  Bharath.K Jan 11 '14 at 11:27

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.