Sponsored Content
Top Forums Web Development Notes with Ravinder on Badging System Development Part II Post 303028400 by Neo on Monday 7th of January 2019 07:46:49 AM
Old 01-07-2019
Update:

While on vacation, had some free time and have written the core code to show a Bootstrap alert when a member badge changes. Also, have the basic code in place to determine exactly which badge changes, so that can be added to the message; but have not written the function to change the array keys to text.

Currently testing via PHP logging. Seems to work fine.

When I am back at my desk, will write a function to change array keys to user friendly text and continue testing.
 

3 More Discussions You Might Find Interesting

1. What is on Your Mind?

New Badging System - Badges Prototype Beta 1 (Badges Only)

Today I mapped out the new badging system using FA icons, Beta 1 in no particular order except a 6 x 8 grid: https://www.unix.com/members/1-albums215-picture991.png The prototype HTML code for this layout: <style> .fa-badge-grid { font-size: 1.5em; } .row { ... (38 Replies)
Discussion started by: Neo
38 Replies

2. What is on Your Mind?

Status of Badging System - Beta 1

Dear All, Here is the current status of the badging system: The Beta 1 phase of the new badging system is close to completion. 42 prototype badges have been "allocated" 6 prototype badge slots are held in reserve The "alert you have new badges" prototype is running and is currently... (4 Replies)
Discussion started by: Neo
4 Replies

3. What is on Your Mind?

Badging System: UNIX.COM Bug Hunter Badge (New)

I have moved the bug badge out of reserve and into the main stream. Basically, I will assign a color level like the others, based on who has made a good actionable bug report for UNIX.COM. "Good" means screenshots, links, and even details from web dev tools our the HTML source code. So far,... (0 Replies)
Discussion started by: Neo
0 Replies
ARRAY_INTERSECT_KEY(3)							 1						    ARRAY_INTERSECT_KEY(3)

array_intersect_key - Computes the intersection of arrays using keys for comparison

SYNOPSIS
array array_intersect_key (array $array1, array $array2, [array $...]) DESCRIPTION
array_intersect_key(3) returns an array containing all the entries of $array1 which have keys that are present in all the arguments. PARAMETERS
o $array1 - The array with master keys to check. o $array2 - An array to compare keys against. o $... - A variable list of arrays to compare. RETURN VALUES
Returns an associative array containing all the entries of $array1 which have keys that are present in all arguments. EXAMPLES
Example #1 array_intersect_key(3) example <?php $array1 = array('blue' => 1, 'red' => 2, 'green' => 3, 'purple' => 4); $array2 = array('green' => 5, 'blue' => 6, 'yellow' => 7, 'cyan' => 8); var_dump(array_intersect_key($array1, $array2)); ?> The above example will output: array(2) { ["blue"]=> int(1) ["green"]=> int(3) } In our example you see that only the keys 'blue' and 'green' are present in both arrays and thus returned. Also notice that the values for the keys 'blue' and 'green' differ between the two arrays. A match still occurs because only the keys are checked. The values returned are those of $array1. The two keys from the key => value pairs are considered equal only if (string) $key1 === (string) $key2 . In other words a strict type check is executed so the string representation must be the same. SEE ALSO
array_diff(3), array_udiff(3), array_diff_assoc(3), array_diff_uassoc(3), array_udiff_assoc(3), array_udiff_uassoc(3), array_diff_key(3), array_diff_ukey(3), array_intersect(3), array_intersect_assoc(3), array_intersect_uassoc(3), array_intersect_ukey(3). PHP Documentation Group ARRAY_INTERSECT_KEY(3)
All times are GMT -4. The time now is 04:27 PM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy