WeberDev.com PHP and MySQL Code

LOG IN
BEGINNER GUIDESPHP CLASSESCODE SEARCHARTICLES SEARCHPHP FORUMSPHP MANUALPHP FUNCTIONS LISTWEB SITE TEMPLATES
Start typing to search for PHP and MySQL Code Snippets and Articles Search
Submit a code Example / Snippet Join us on FaceBook
Submit a code Example / Snippet Submit Your Code
Poker Tournaments Poker Tournaments
Poker Guide for Developers Poker Guide for Developers
Search Engine Optimization Monitor SEO Monitor
Web Site UpTime Monitor UpTime Monitor
Your Personal Examples List My Favorite Examples
Your Personal Articles List My Favorite Articles
Edit Account Info Update Your Profile
PHP Code Search
Web Development Forums
Learn MySQL Playing Trivia
PHPBB2 Templates
Web Development Resources
Web Development Content
Internet Security Software
PHPClasses
PHP Editor
PHP Jobs
Vision.To Design
Ajax Tutorials
PHP Programming Help
PHP/MySQL Programming
Webmaster Resources
Webmaster Forum
XML meta language
website builder
פרייסז - הכח לקנות עובר לידיים שלך
Texas Holdem Poker Evangelists

Go Back Add a Comment Send this example to a friend Add this Article to your personal favoritest for easy future access to your favorite Code Examples and Articles. Submit a code example Print this code example.
BACK ADD A COMMENT SEND TO A FRIEND ADD TO MY FAVORITES ADD CODE EXAMPLES PRINT
Title : minus - subtract arrays. Send two arrays and get an array with the operation A-B, elements on A that are not included on B.
Categories : PHP, Arrays, Algorithms Update Picture
jose di
Date : Feb 15th 2001
Grade : 1 of 5 (graded 3 times)
Viewed : 12889
File : No file for this code example.
Images : No Images for this code example.
Search : More code by jose di
Action : Grade This Code Example
Tools : My Examples List

Submit your own code examples  Submit your own code examples 
 

<?php
function RestaDeArrays($vectorA,$vectorB)
{
$cantA=count($vectorA);
$cantB=count($vectorB);
$No_saca=0;
for($i=0;$i<$cantA;$i++)
{
for($j=0;$j<$cantB;$j++)
{
if($vectorA[$i]==$vectorB[$j])
$No_saca=1;
}

if($No_saca==0)
$nuevo_array[]=$vectorA[$i];
else
$No_saca=0;
}

return $nuevo_array;
}

?>

how to use it--->$result=RestaDeArrays($arrayA,$arrayB);



A class to put get and post variables in hidden form elements. Works on scalars, normal arrays, associative arrays.
Categories : Algorithms, Variables, Arrays, PHP, PHP Classes
quick sort for associative arrays
Categories : Algorithms, Arrays, PHP
A simple bubblesort that takes 2 arrays as argument.The first one is the actual data used for sorting, the second is data that will "tag along" with the first array, for instance a descriptive text about the data in the first array.
Categories : Algorithms, Arrays, PHP, Complete Programs
A recursive function to traverse a multi-dimensional array where the dimensions are not known
Categories : Arrays, PHP, Algorithms
This script will read all images from a folder and read the files into an array. It uses rand() to get a random number. It will display a random image from the image folder given.
Categories : PHP, Arrays, Graphics, Filesystem
This functions makes it easy to use session-variables known from ASP. With one Cookie the array "session" will save and restore from a db-record. In this version MySQL is used but it's should very easy to change
Categories : PHP, Arrays, Cookies, MySQL, Databases
How to validate an Israeli ID number.
Categories : Ecommerce, PHP, Algorithms
Compare two texts and display a block of text with the differences between them.
Categories : PHP, PHP Classes, Filesystem, Strings, Arrays
XML To Array
Categories : PHP, PHP Classes, XML, Arrays
Can the word DO be used in arrays?
Categories : Arrays, PHP, Strings
WWW interface to Unix Manual(phpMan)
Categories : Program Execution, Strings, Arrays, PHP
Get TemplateMonster data
Categories : Arrays, Ecommerce, PHP, Strings
Tweak Array, insert/add elements to any position of your arrays - delete elements from your arrays - move elements within your arrays - replace elements from your arrays ... the array, 'dynamically' grows or shrinks to whatever we tweak it.
Categories : PHP Classes, Arrays, PHP
Fast PI calculator. Can easily find the 1000th decimal place of pi in 5 seconds.
Categories : PHP, BC math, Algorithms
How to pass an array to a function, or how to define a function wich recieves an array.
Categories : Variables, PHP, Arrays